package com.mqtt.ctwingmqtt.service.Impl;

import com.mqtt.ctwingmqtt.domain.entity.NIIEntity;
import com.mqtt.ctwingmqtt.mapper.IIMapper;
import com.mqtt.ctwingmqtt.service.IIService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IIServiceImpl implements IIService {
    @Autowired
    private IIMapper iIMapper;
    @Override
    public String getdeviceAddress(String deviceId) {
        return iIMapper.getdeviceAddress(deviceId);
    }

    @Override
    public Boolean add(NIIEntity niiEntity) {
        int insert = iIMapper.insert(niiEntity);
        return insert > 0;
    }
}
